<template>
	<c-pop-box :d="{close:false,gap:false}">
		<view class="c-qa-success bg-color-white border-radius20 padding-top37 padding-bottom93">
			<view class="dis-flex margin-bottom24">
				<image style="width:332upx;height:268upx" src="/static/images/ui_tiaozhanshengli.png"></image>
			</view>
			<view class="font-size49 text-center margin-bottom44">挑战成功</view>
			<view class="dis-flex margin-bottom86">
				<view class="font-size32" style="color:#878586">恭喜获得兑换劵 <text class="font-size37 color-red">x1</text></view>
			</view>
			<view class="dis-flex margin-bottom44">
				<view @tap="goHome()" class="dis-flex height84 border-radius" style="width:523upx;background-color:#FE5E00">
					<text class="font-size33 color-white line-height">点击领奖</text>
				</view>
			</view>
			<view class="dis-flex">
				<button open-type="share" class="dis-flex height84 border-radius" style="width:523upx;background-color:#475FE5">
					<text class="font-size33 color-white line-height">炫耀成绩</text>
				</button>
			</view>
		</view>
	</c-pop-box>
</template>
<script>
	import {
		mapGetters,
		mapActions
	} from 'vuex';
	import CPopBox from '@/components/global/c-pop/c-pop-box';
	export default {
		name: 'c-qa-success',
		props: {
			d: {
				type: Object
			}
		},
		components: {
			CPopBox
		},
		data() {
			return {
				list: []
			};
		},
		watch: {},
		computed: {},
		methods: {
			...mapActions('pop', ['popShow']),
			goHome() {
				this.popShow();
				this.$store.dispatch('videoAd/show', {
					success: () => {
						uni.reLaunch({
							url: '/pages/tabBar/user/index'
						});
					},
					fail: () => {
						uni.showToast({
							title: '播放失败',
							icon: 'none'
						});
						uni.reLaunch({
							url: '/pages/tabBar/home/index'
						});
					}
				});
			},
			btnShare() {
				console.log('分享');
			}
		},
		created() {},
		mounted() {}
	};
</script>
<style lang="scss" scoped>
	.c-qa-success {
		width: 632upx;
		min-height: 868upx;
	}
</style>
